/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.evangelion.core.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Kellycasma
 */
@Entity
@Table(name = "movimientos_aux")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "MovimientoAux.findAll", query = "SELECT m FROM MovimientoAux m"),
    @NamedQuery(name = "MovimientoAux.findById", query = "SELECT m FROM MovimientoAux m WHERE m.id = :id"),
    @NamedQuery(name = "MovimientoAux.findByFecha", query = "SELECT m FROM MovimientoAux m WHERE m.fecha = :fecha"),
    @NamedQuery(name = "MovimientoAux.findByConcepto", query = "SELECT m FROM MovimientoAux m WHERE m.concepto = :concepto"),
    @NamedQuery(name = "MovimientoAux.findByDocumento", query = "SELECT m FROM MovimientoAux m WHERE m.documento = :documento"),
    @NamedQuery(name = "MovimientoAux.findByDebe", query = "SELECT m FROM MovimientoAux m WHERE m.debe = :debe"),
    @NamedQuery(name = "MovimientoAux.findByHaber", query = "SELECT m FROM MovimientoAux m WHERE m.haber = :haber"),
    @NamedQuery(name = "MovimientoAux.findByIva", query = "SELECT m FROM MovimientoAux m WHERE m.iva = :iva"),
    @NamedQuery(name = "MovimientoAux.findByImpIVA", query = "SELECT m FROM MovimientoAux m WHERE m.impIVA = :impIVA"),
    @NamedQuery(name = "MovimientoAux.findByBc", query = "SELECT m FROM MovimientoAux m WHERE m.bc = :bc"),
    @NamedQuery(name = "MovimientoAux.findByDescuentoDeclaracion", query = "SELECT m FROM MovimientoAux m WHERE m.descuentoDeclaracion = :descuentoDeclaracion"),
    @NamedQuery(name = "MovimientoAux.findByTotal", query = "SELECT m FROM MovimientoAux m WHERE m.total = :total")})
public class MovimientoAux implements Serializable {

    @JoinColumn(name = "id_declaracion", referencedColumnName = "id")
    @ManyToOne
    private Declaracion declaracion;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "fecha")
    @Temporal(TemporalType.DATE)
    private Date fecha;
    @Size(max = 500)
    @Column(name = "concepto")
    private String concepto;
    @Size(max = 15)
    @Column(name = "documento")
    private String documento;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "debe")
    private Double debe;
    @Column(name = "haber")
    private Double haber;
    @Column(name = "IVA")
    private Double iva;
    @Column(name = "imp_IVA")
    private Double impIVA;
    @Column(name = "BC")
    private Double bc;
    @Column(name = "descuento_declaracion")
    private Double descuentoDeclaracion;
    @Column(name = "Total")
    private Double total;
    @JoinColumn(name = "id_seccion", referencedColumnName = "id")
    @ManyToOne
    private Seccione seccion;
    @JoinColumn(name = "id_cliente", referencedColumnName = "id")
    @ManyToOne
    private Cliente cliente;

    public MovimientoAux() {
    }

    public MovimientoAux(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public String getConcepto() {
        return concepto;
    }

    public void setConcepto(String concepto) {
        this.concepto = concepto;
    }

    public String getDocumento() {
        return documento;
    }

    public void setDocumento(String documento) {
        this.documento = documento;
    }

    public Double getDebe() {
        return debe;
    }

    public void setDebe(Double debe) {
        this.debe = debe;
    }

    public Double getHaber() {
        return haber;
    }

    public void setHaber(Double haber) {
        this.haber = haber;
    }

    public Double getIva() {
        return iva;
    }

    public void setIva(Double iva) {
        this.iva = iva;
    }

    public Double getImpIVA() {
        return impIVA;
    }

    public void setImpIVA(Double impIVA) {
        this.impIVA = impIVA;
    }

    public Double getBc() {
        return bc;
    }

    public void setBc(Double bc) {
        this.bc = bc;
    }

    public Double getDescuentoDeclaracion() {
        return descuentoDeclaracion;
    }

    public void setDescuentoDeclaracion(Double descuentoDeclaracion) {
        this.descuentoDeclaracion = descuentoDeclaracion;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public Seccione getSeccion() {
        return seccion;
    }

    public void setSeccion(Seccione seccion) {
        this.seccion = seccion;
    }

    public Cliente getCliente() {
        return cliente;
    }

    public void setCliente(Cliente cliente) {
        this.cliente = cliente;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MovimientoAux)) {
            return false;
        }
        MovimientoAux other = (MovimientoAux) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.evangelion.core.bean.MovimientoAux[ id=" + id + " ]";
    }

    public Declaracion getDeclaracion() {
        return declaracion;
    }

    public void setDeclaracion(Declaracion declaracion) {
        this.declaracion = declaracion;
    }
}
